package com.study.mapper;

import com.study.pojo.Users;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface UsersMapper {
    List<Users> selectAll();

    // 注册
    void register(Users users);

    Users findUserByUsername(String username);

    // 修改用户信息
    @Update("update users set update_time = now(), phone = #{phone}, email = #{email}, address = #{address} where id = #{id}")
    void updateUserInfo(Users users);
}
